<eda-dialog [inject]="dialog">



  <div body class='grid'>

    <div *ngIf="!noCache" class="col-4" >

      <div class="col-12">
        <h6 i18n="@@RefreshCacheTitle"> Actualizar los datos del modelo cada: </h6>
      </div>

      <div class="col-12">
        <p-inputNumber [(ngModel)]="quantity" [disabled]="noCache"></p-inputNumber>
      </div>
      <div class="col-12">
        <p-radioButton name="groupname" value="days" [label]="daysSTR" [(ngModel)]="units" [disabled]="noCache">
        </p-radioButton>
      </div>
      <div class="col-12" *ngIf="units==='days'">
        <span> A las </span>
        <p-calendar [timeOnly]="true" [(ngModel)]="hours"></p-calendar>
      </div>
      <div class="col-12">
        <p-radioButton name="groupname" value="hours" [label]="hoursSTR" [(ngModel)]="units" [disabled]="noCache">
        </p-radioButton>
      </div>
    </div>

    <div class="col-4">

      <div class="col-12">
        <h6 i18n="@@noCache">Sin cache</h6>
        <p-inputSwitch id="switchCache" class="col-1" [(ngModel)]="noCache" tooltipPosition="left">
        </p-inputSwitch>
      </div>



    </div>

    <div class="col-4">
      <div class='col-12'>

        <!-- <h6 i18n="@@deleteCache">Borrar cache del modelo</h6> -->
        <button type="button" pButton (click)="deleteCache()" class="ui-button-success ml-2" i18n-label='@@deleteCache'
          label="Borrar caché"></button>

      </div>
    </div>

  </div>

  <div footer>
    <div class="ui-dialog-buttonpane ui-widget-content ui-helper-clearfix text-right">
      <button type="button" pButton (click)="saveConfig()" class="ui-button" i18n-label="@@guardarBtn"
        [disabled]="checkForm()" icon="fa fa-check" label="Confirmar">
      </button>
      <button type="button" pButton (click)="closeDialog()" class="p-button-raised p-button-danger" i18n-label="@@cerrarBtn"
        label="Cerrar"></button>
    </div>
  </div>


</eda-dialog>